package com.songhq.data.log.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MLogFactory
{
  private static final Logger log = LoggerFactory.getLogger(MLogFactory.class);
  private static final Logger log_call = LoggerFactory.getLogger("LOG_CALL_INFO");
  private static final Logger log_call_err = LoggerFactory.getLogger("LOG_CALL_ERR");
  private static final Logger log_feigin = LoggerFactory.getLogger("LOG_FEIGN");
  private static final Logger log_playurl = LoggerFactory.getLogger("LOG_PLAYURL");
  private static final Logger log_client = LoggerFactory.getLogger("LOG_CLIENT");
  private static final Logger log_cache_miss = LoggerFactory.getLogger("LOG_CACHE_MISS");
  private static final Logger log_comm = LoggerFactory.getLogger("LOG_COMM");
  private static final Logger log_gateway = LoggerFactory.getLogger("LOG_GATEWAY");
  private static final Logger log_mongo = LoggerFactory.getLogger("LOG_MONGO");
  private static final Logger log_cache_update = LoggerFactory.getLogger("LOG_CACHE_UPDATE");

  public static Logger getLog(String logType)
  {
    if (logType.equals("LOG_CALL_INFO"))
      return log_call;
    if (logType.equals("LOG_CALL_ERR"))
      return log_call_err;
    if (logType.equals("LOG_FEIGN"))
      return log_feigin;
    if (logType.equals("LOG_PLAYURL"))
      return log_playurl;
    if (logType.equals("LOG_CLIENT"))
      return log_client;
    if (logType.equals("LOG_CACHE_MISS"))
      return log_cache_miss;
    if (logType.equals("LOG_COMM"))
      return log_comm;
    if (logType.equals("LOG_GATEWAY"))
      return log_gateway;
    if (logType.equals("LOG_MONGO"))
      return log_mongo;
    if (logType.equals("LOG_CACHE_UPDATE")) {
      return log_cache_update;
    }

    return log;
  }

  public static Logger getLog()
  {
    return log;
  }
}